package com.chatuser.userbase.common;

import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.common.constants.CommonConstants;
import org.apache.dubbo.common.extension.Activate;
import org.apache.dubbo.rpc.*;

/**
 * dubbo登录过滤器，透传用户信息
 *
 * @author cong.zhen
 * @date 2022/05/20
 */
@Slf4j
@Activate(group = {CommonConstants.PROVIDER,CommonConstants.CONSUMER}, order = 100)
public class DubboLoginFilter implements Filter {

    @Override
    public Result invoke(Invoker<?> invoker, Invocation invocation) throws RpcException {
        if(RpcContext.getContext().isProviderSide()){

        }
        return null;
    }
}
